home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 015 / hpstuff.arc / HPSTUFF.DOC < prev    next >
Text File  |  1987-02-27  |  6KB  |  125 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.                                 HP LaserJet Tools
  10.                                     Rip Toren
  11.                                      POB 674
  12.                                 Columbia MD 21045
  13.  
  14.  
  15.  
  16.     This is a collection of programs that have developed over time to assist
  17.     in working with the HP LaserJet printer.  My HPLJ has no font cartridges,
  18.     and I quickly learened it could not do the PC line drawing symbols.  
  19.  
  20.     HPFILTER
  21.     This is a TSR (terminate and stay resident) program that I use to produce
  22.     line drawing characters on my printer that does not have any FONT
  23.     cartridges.  It is tied into the interrupt to the printer (17).  It looks
  24.     for ASCII codes 179 through 223.  When these are found, a command string
  25.     is sent to the HPLJ to produce those line grawing characters.  It will
  26.     also BOLD (fatten) characters between an ESC 'G' and ESC 'H'. ESC 'G will
  27.     start it, while ESC'H' or ESC'E' will terminate it. It will definitely
  28.     screw up any output to anything other that the HPLJ if these characters
  29.     are sent.  To turn off the filtering, simply run it a second time.
  30.  
  31.     >HPFILTER
  32.  
  33.     HPXFER
  34.     While trying to develop the strings that HPFILTER would use, it became
  35.     apparent that it was a pain to modify and rec assemble.  This drove the
  36.     development of HPXFER.  
  37.  
  38.     This program will read in a standard Ascii file and send part of it to
  39.     the printer. The file name is the only argument. If it is not found, the
  40.     extension '.HPX' will be appended, and the open tried again. The data
  41.     found on each line is sent until a tilde ('~') is located. Every thing
  42.     following the tilde is treated as comment.  If the end of the line is
  43.     found without finding a tilde, the CRLF is also sent to the printer.
  44.  
  45.     If a line is read that starts with '@' in character 1, the rest is
  46.     assumed to be a file name. That file is opened in BINARY mode, and its
  47.     entire content is sent to the printer.  This is usually a bit graphic
  48.     image.
  49.  
  50.     >HPXFER LOGOSET.HPX
  51.  
  52.     ** WARNING **   It is generally a bad idea to send binary data to the
  53.                     printer while HPFILTER is active. It will garble (transl-
  54.                     ate) any binary values that fall within its range.
  55.                     Probably with very poor results.
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.     CPAINT
  64.  
  65.  
  66.     Now that there is a way to send single command lines, and binary files,
  67.     all that is needed is a way to obtain those binary files. CPAINT (See
  68.     PAINT) is one way to do that. CPAINT will read a PC Paintbrush
  69.     (Zsoft/Microsoft) file (PCX or PCC) and produce up to four data files.
  70.     Each data file corresponds to one level or plane in the image.  They are
  71.     usually RED, GREEN, BLUE, and INTENSITY.  Each output file starts with
  72.     the HPLJ code to begin graphics ('ESC *r1A'), with the current cursor
  73.     location as the left margin. The file ends with an end of graphic code
  74.     ('ESC *rB').  Each graphic line is also setup with the proper HPLJ code
  75.     for the number of bytes of binary data. 
  76.  
  77.     The program does one special thing. As it is scanning the input, it does
  78.     not transfer any data to the output files until a scan line has been
  79.     located that contain a set bit.  This means that your resulting file will
  80.     not contain white space above the image.  You position the cursor prior
  81.     to printing for exact registration.
  82.  
  83.     >CPAINT RTLOGO.PCX YNNN
  84.  
  85.     Since the amount of information is rather massive that can be produced, a
  86.     second argument is checked for flags. This argument will allow you to
  87.     suppress the production of any of the planes.  The output files are named
  88.     "PLANEx.DAT" where 'x' is a number 1 through 8. If you wish to produce
  89.     only planes 2 & 3, the second argument would by "NYYN".  This says '(N)o'
  90.     to planes 1 & 4, and '(Y)es' to planes 2 & 3.  When using an EGA adaptor,
  91.     you currently get only 4 planes, so you needn't worry about the last
  92.     four. Only enough data file are use to cover the number of planes in the
  93.     file.
  94.  
  95.     If you draw your image in Black lines on a White background, you will
  96.     find that all four planes conatin the same pattern.  If you use patterns,
  97.     are different colors, you may find data in some planes, and not in
  98.     others.
  99.  
  100.     READY - SET - GO
  101.  
  102.     Draw your image using PC Paintbrush. Crop, cut and save only the part you
  103.     want to appear on the page. Run CPAINT to extract the planes you want to
  104.     print. Build the rest of the commands that you want for positioning and
  105.     line drawing, as well as any included image files into a an Ascii file.
  106.     Run HPXFER to send that file to your HPLJ. Ta-Da. If the lines look OK,
  107.     but the image is real trash, check to insure that HPFILTER is de-
  108.     activated or not installed at all.
  109.  
  110.     NOTES
  111.     HPFILTER was originally designed to work with WordPerfect 4.1. I have
  112.     been using it now for 3 months with no problems. I have my HPLJ attached
  113.     to LPT1.  I had to create my own character definition using the "PRINTER"
  114.     program supplied with WP 4.1. I copied one of the character sets into my
  115.     own name, the modified it to send the simpla Ascii for characters 179
  116.  
  117.  
  118.  
  119.  
  120.  
  121.     through 223. I also was able to obtain "BOLD" ouput by doing it on a
  122.     second pass, and having the start string offset the printer cursor up and
  123.     over one dot. At the end of the pass, the cursor is offset back and down
  124.     one dot.
  125.